﻿<Window x:Class="Oxage.Views.FindWindow"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:c="clr-namespace:Oxage"
	xmlns:v="clr-namespace:Oxage.Views"
	xmlns:m="clr-namespace:Oxage.Models"
  Title="Find and Replace" ResizeMode="NoResize" WindowStyle="ToolWindow" KeyDown="Window_KeyDown"
  Width="320" Height="260" Background="{StaticResource WindowBackgroundBrush}">
  <Window.DataContext>
    <m:FindViewModel />
  </Window.DataContext>
  <Grid x:Name="LayoutRoot" Background="#444444">
    <StackPanel Margin="10">
      <TextBlock Text="Find what" Foreground="White" Margin="0,0,0,5" />
      <TextBox x:Name="txtFind" Text="{Binding FindText, Mode=TwoWay}" />

      <TextBlock Text="Replace with" Foreground="White" Margin="0,10,0,5" />
      <TextBox x:Name="txtReplace" Text="{Binding ReplaceText, Mode=TwoWay}" />

      <TextBlock Text="Options" Foreground="White" Margin="0,10,0,5" />
      <CheckBox Content="Match case" IsChecked="{Binding MatchCase, Mode=TwoWay}" />
      <CheckBox Content="Search up" IsChecked="{Binding SearchUp, Mode=TwoWay}" />
      <CheckBox Content="In selection" IsChecked="{Binding InSelection, Mode=TwoWay}" />
      <CheckBox Content="Regular Expression" IsChecked="{Binding IsRegex, Mode=TwoWay}" />

      <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
        <Button Content="Find Next" Click="Find_Click" />
        <Button Content="Replace" Margin="5,0,0,0" Click="Replace_Click" />
        <Button Content="Replace All" Margin="5,0,0,0" Click="ReplaceAll_Click" />
      </StackPanel>
    </StackPanel>
  </Grid>
</Window>
